﻿myApp.controller("CouponCtrl", ['$scope', '$http', '$routeParams', '$restUrls', '$post', '$rootScope', function ($scope, $http, $routeParams, $restUrls, $post, $rootScope) {
    $scope.CouponList = [];
    $scope.GetCustomerLotteryRecord = function (order_id) {
        $http({ method: "GET", url: $restUrls["getCustomerLotteryRecord"], params: {} }).success(function (result) {
            
            if (result.success == 1) {
                for (var i = 0; i < result.data.length; i++) {
                    if (result.data[i].type == 2) {
                        $scope.CouponList.push(result.data[i]);
                    }
                }
            }
        });
    }
    $scope.GetCustomerLotteryRecord();
}]);


